<%= form_for @changeset, @action, [as: :role], fn f -> %>
<div class="form-group row ">
   <%= input f, :name, nil, is_horizontal: true, description: "Give name for this role." %>
</div>
<div class="form-group row ">
   <%= input f, :description, nil, is_horizontal: true, description: "Add a short description for this role." %>
</div>
<div class="form-group row ">
   <label for="inputEmail3" class="col-sm-3 col-form-label">
      <div class="label">
         Permissions
      </div>
      <div class="label-txt">Select permission/s for this role.</div>
   </label>
   <div class="col-sm-9">           
      <%= multiple_select(f, :permissions, formatted_list(:permissions),
         prompt: "Add Permission", class: "full-width w-100 mb-3", "data-init-plugin": "select2")%>
   </div>
</div>
<div class="form-group row stickformbutton">
   <div class="col-sm-10">
      <%= submit "Submit", class: "btn btn-primary submit-btn float-right" %>
      <%= link("Cancel", to: role_path(@conn, :index), class: "btn btn-secondary btn-outline-secondary float-left", type: "button") %>
   </div>
</div>
<% end %>